﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace TowerDefense.Actors
{
    public class PlayerUnit : Unit
    {
        public PlayerUnit(Texture2D texture, Color color)
            : base(texture, color)
        {

        }

        public override void Update()
        {
            //TODO: location changes in relation to speed at direction
        }

        public override void Draw(SpriteBatch spriteBatch, Location location)
        {
            float rotation = (float)Math.Atan2(this.direction.Y, this.direction.X); //Radians
            spriteBatch.Draw(this.texture, this.GetWorldLocation(location), null, color, rotation, this.origin, 1f, SpriteEffects.None, 0f);
        }

        public override void Move(Location destination)
        {
            base.Move(destination);
        }
    }
}
